<h1>Public: Info for OAuth Consumer Developers</h1>

<form>
  <dl>
    <dt><label for="">Request token URL</label></dt>
    <dd><input type="text" id="request_token_url"
         value="<%%=h request_token_<%= singular_name %>_url("oauth") %>" /></dd>
    <dt><label for="">Authorization URL</label></dt>
    <dd><input type="text" id="authorization_url"
         value="<%%=h authorize_<%= singular_name %>_url("oauth") %>" /></dd>
    <dt><label for="">Access token URL</label></dt>
    <dd><input type="text" id="access_token_url"
         value="<%%=h access_token_<%= singular_name %>_url("oauth") %>" /></dd>
  </dl>
</form>

<h1>Admin: List of registered Consumers</h1>

<table>
  <tr>
<% for attribute in attributes -%>
    <th><%= attribute.column.human_name %></th>
<% end -%>
  </tr>
  
<%% for <%= singular_name %> in @<%= plural_name %> %>
  <tr>
<% for attribute in attributes -%>
    <td><%%=h <%= singular_name %>.<%= attribute.name %> %></td>
<% end -%>
    <td><%%= link_to 'Show', <%= singular_name %>_path(<%= singular_name %>) %></td>
    <td><%%= link_to 'Edit', edit_<%= singular_name %>_path(<%= singular_name %>) %></td>
    <td><%%= link_to 'Destroy', <%= singular_name %>_path(<%= singular_name %>), :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<%% end %>
</table>

<br />

<%%= link_to 'Register new OAuth consumer application', new_<%= singular_name %>_path %>